import request from "@/utils/request";

// 查询物料产品关系追溯列表
export function listbarcodeRelation(query) {
  return request({
    url: "/ems/barcodeRelation/list",
    method: "get",
    params: query,
  });
}

// 查询物料产品关系追溯详细
export function getbarcodeRelation(po) {
  return request({
    url: "/ems/barcodeRelation/" + po,
    method: "get",
  });
}

// 新增物料产品关系追溯
export function addbarcodeRelation(data) {
  return request({
    url: "/ems/barcodeRelation",
    method: "post",
    data: data,
  });
}

// 修改物料产品关系追溯
export function updatebarcodeRelation(data) {
  return request({
    url: "/ems/barcodeRelation",
    method: "put",
    data: data,
  });
}

// 删除物料产品关系追溯
export function delbarcodeRelation(po) {
  return request({
    url: "/ems/barcodeRelation/" + po,
    method: "delete",
  });
}

// 导出物料产品关系追溯
export function exportbarcodeRelation(query) {
  return request({
    url: "/ems/barcodeRelation/export",
    method: "get",
    params: query,
  });
}
// 
// 解绑
export function unbindingRelation(data) {
  return request({
    url: "/ems/barcodeRelation/unbindingRelation",
    method: "post",
    data: data,
  });
}